package com.iting.test.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author iting Nie
 * @version 1.1
 * @create 2022/2/11
 */
@Service
public class AsyncService {
	@Async
	public void asyncDemo(){
		System.out.println(Thread.currentThread().getName());
		try {
			Thread.sleep(10000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println("2");
	}
}
